package com.tianpengtech.common.model.fairwithdraw;

import com.tianpengtech.common.model.AbstractBaseModel;

/**
 * 实体类名-网红提现表 fair_wh_withdraw
 *
 * @since Fri Sep 15 10:47:26 HKT 2017
 */
public class FairWithdraw extends AbstractBaseModel<FairWithdraw> {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	public static final FairWithdraw dao = new FairWithdraw();

	public static final String ID = "id"; //
	public static final String WH_ID = "wh_id"; // 网红id
	public static final String MONEY = "money"; // 提现金额
	public static final String CREATE_TIME = "create_time"; // 提交时间
	public static final String HANDLE_TIME = "handle_time"; //
	public static final String BANK_ID = "bank_id"; // 银行卡表ID
	public static final String STATUS = "status"; // 状态

	public static final int STATUS_APPROVING = 1; // 等待审核
	public static final int STATUS_SUCCESS = 2; // 已经处理
	public static final int STATUS_ERROR = 3; // 处理失败

	@Override
	public String tableName() {
		return "fair_wh_withdraw";
	}

	
	public String status(){
		String result="未知";
		if(getInt(STATUS)==STATUS_APPROVING){
			result = "等待处理";
		}else if(getInt(STATUS)==STATUS_SUCCESS){
			result = "已经处理";
		}else if(getInt(STATUS)==STATUS_ERROR){
			result = "拒绝通过";
		}
		return result;
	}
	
	
	public float platFormFee(){
		return (float)(getDouble(FairWithdraw.MONEY)*0.1);
	}
}